package com.ruoyi.blog.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.blog.domain.BlogAvatarBorder;
import com.ruoyi.blog.domain.vo.BlogAvatarBorderVo;
import com.ruoyi.blog.mapper.BlogAvatarBorderMapper;
import com.ruoyi.blog.service.BlogAvatarBorderService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
* @author 35038
* @description 针对表【blog_avatar_border】的数据库操作Service实现
* @createDate 2024-12-07 21:31:11
*/
@Service
public class BlogAvatarBorderServiceImpl extends ServiceImpl<BlogAvatarBorderMapper, BlogAvatarBorder>
    implements BlogAvatarBorderService {

    @Resource
    private BlogAvatarBorderMapper blogAvatarBorderMapper;

    @Override
    public List<BlogAvatarBorderVo> getList( BlogAvatarBorder blogAvatarBorder) {
       return blogAvatarBorderMapper.getList(blogAvatarBorder);
    }

    @Override
    public Boolean sync(List<BlogAvatarBorderVo> list) {
        list.forEach(item -> {
            item.setUrl(item.getFile().getUrl());
        });
        return blogAvatarBorderMapper.sync(list);
    }
}




